<!DOCTYPE html>
<head>
<meta charset=utf-8" />
<title>无标题文档</title>

<script src="jquery-1.8.0.min.js" type="text/javascript"></script>
</head>

<body>

<div id="counter_div"></div>

<script type="text/javascript">
if(localStorage.counter == null) {
	localStorage.counter = 1;
    
    alert("1");
	} else {
		localStorage.counter++; 
		}
		var counter_div = document.getElementById("counter_div");
       
		counter_div.innerHTML = localStorage.counter;
		 
</script>
</body>
</html>
